package com.cn.lp.export.client.export;

/**
 * Description: 导出状态
 *
 * @author wuqirong
 * @date 2020-10-16
 * <p>
 * All rights Reserved, Designed www.xiao100.com
 */
public enum ExportStatus {

    /** 准备 */
    READY(1),

    /** 运行中 */
    RUNNING(2),

    /** 完成 */
    FINISH(3),

    /** 失败 */
    FAIL(4),

    /** 取消 */
    CANCEL(5),

    ;

    int id;

    ExportStatus(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public static ExportStatus getById(int id) {
        for (ExportStatus exportStatus : ExportStatus.values()) {
            if (exportStatus.id == id) {
                return exportStatus;
            }
        }
        return null;
    }
}
